
  <style>
    .layui-form-item .layui-input-company {width: auto;padding-right: 10px;line-height: 38px;}
  </style>

<body>
<div class="layuimini-container">
  <div class="layuimini-main">

    <div class="layui-form layuimini-form">
      <div class="layui-form-item">
        <label class="layui-form-label required">管理账号</label>
        <div class="layui-input-block">
          <input  disabled type="text"  placeholder="请输入管理账号"  value="admin" class="layui-input">
          <tip>管理账号作为唯一登录依据，不可以修改</tip>
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label required">手机</label>
        <div class="layui-input-block">
          <input type="number" autocomplete="off" name="mobile"   placeholder="请输入手机"  value="{$model->mobile}" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block">
          <input type="email" name="email" autocomplete="off"  placeholder="请输入邮箱"  value="{$model->email}" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注信息</label>
        <div class="layui-input-block">
          <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$model->remark}</textarea>
        </div>
      </div>

      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  layui.use(['form','miniTab','jquery'], function () {
    var form = layui.form,
            layer = layui.layer,
            miniTab = layui.miniTab;
    var $ = layui.jquery;
    //监听提交
    form.on('submit(saveBtn)', function (data) {
      var post_data = data.field;
      $.post('{:url("admin/user_setting")}',post_data,function (res){
          if(res.code==0){
            layer.msg('修改成功',{icon: 1}, function () {
              miniTab.deleteCurrentByIframe();
            });
          }else{
            layer.msg(res.msg,{icon: 2}, function () {
            });
          }
      });
      return false;
    });

  });
</script>
</body>
</html>